package com.javasm.controller;

import com.javasm.common.http.AxiosResult;
import com.javasm.common.page.PageResult;
import com.javasm.domin.criteria.AftersaleEnterDepotDetailCriteria;
import com.javasm.domin.vo.AftersaleEnterDepotDetailVo;
import com.javasm.service.AftersaleEnterDepotDetailService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：longjinyi
 * @Version：1.0
 * @Date：2022/1/20-22:48
 * @Since:jdk1.8
 * @Description:
 */
@RestController
@RequestMapping("aftersale-enter-depot-detail")
@RequiredArgsConstructor
public class AftersaleEnterDepotDetailController {

    private final AftersaleEnterDepotDetailService aftersaleEnterDepotDetailService;

    /**
     * 分页查询所有
     * @param aftersaleEnterDepotDetailCriteria
     * @return
     */
    @GetMapping("list")
    public AxiosResult<PageResult<AftersaleEnterDepotDetailVo>> list(AftersaleEnterDepotDetailCriteria aftersaleEnterDepotDetailCriteria) {
        PageResult<AftersaleEnterDepotDetailVo> list = aftersaleEnterDepotDetailService.selectByPage(aftersaleEnterDepotDetailCriteria);
        System.out.println(list);
        return AxiosResult.success(list);
    }
}
